package o;

import android.content.Context;
import android.view.ActionProvider;
import android.view.ActionProvider.VisibilityListener;
import android.view.MenuItem;
import android.view.View;
import androidx.annotation.RequiresApi;
import androidx.annotation.RestrictTo;

@RequiresApi(16)
@RestrictTo({androidx.annotation.RestrictTo.d.LIBRARY_GROUP})
class bl extends bi {

    class d extends a implements VisibilityListener {
        final /* synthetic */ bl ˋ;
        o.hd.d ˏ;

        public d(bl blVar, Context context, ActionProvider actionProvider) {
            this.ˋ = blVar;
            super(blVar, context, actionProvider);
        }

        public View ॱ(MenuItem menuItem) {
            return this.ˎ.onCreateActionView(menuItem);
        }

        public boolean ˋ() {
            return this.ˎ.overridesItemVisibility();
        }

        public boolean ˎ() {
            return this.ˎ.isVisible();
        }

        public void ˋ(o.hd.d dVar) {
            VisibilityListener visibilityListener;
            this.ˏ = dVar;
            ActionProvider actionProvider = this.ˎ;
            if (dVar == null) {
                visibilityListener = null;
            }
            actionProvider.setVisibilityListener(visibilityListener);
        }

        public void onActionProviderVisibilityChanged(boolean z) {
            if (this.ˏ != null) {
                this.ˏ.ˏ(z);
            }
        }
    }

    bl(Context context, gk gkVar) {
        super(context, gkVar);
    }

    a ˊ(ActionProvider actionProvider) {
        return new d(this, this.ˊ, actionProvider);
    }
}
